﻿using FreeSwitch.EventSocket.Parser;

namespace FreeSwitch.EventSocket.Commands
{
	/// <summary>
	/// A command that can be sent to FreeSWITCH.
	/// </summary>
	public interface ICommand
	{
		/// <summary>
		/// Parses a reply sent from FreeSWITCH for a command.
		/// </summary>
		/// <param name="msg"></param>
		/// <returns></returns>
		ICommandReply ParseReply(ParsedMessage msg);

		/// <summary>
		/// Generate a string that can be sent to FreeSWITCH
		/// </summary>
		/// <returns>String that FreeSWITCH can interpret as a command.</returns>
		string ToCommandString();
	}
}